<template>
<el-container class="home-container">
  <el-aside width=""><common-aside></common-aside></el-aside>
  <el-container>
    <el-header><common-header></common-header></el-header>
    <common-tag></common-tag>
    <el-main><router-view v-if="onloadAlive"></router-view></el-main>
  </el-container>
</el-container>
</template>
<script>
import CommonAside from './common/CommonAside.vue'
import CommonHeader from './common/CommonHeader.vue'
import CommonTag from './common/CommonTag.vue'
export default {
  components: {
    CommonAside,
    CommonHeader,
    CommonTag
  },
  data () {
    return {
      onloadAlive: true
    }
  },
  methods: {
    onloadOpt () {
      this.onloadAlive = false
      this.$nextTick(() => (this.onloadAlive = true))
    }
  },
  watch: {
    '$store.state.tab.keepAliveVue' (newVal, oldVal) {
      // console.log('刷新')
      this.onloadOpt()
    }
  }

}
</script>
<style lang='less' scoped>
home-container{
  height:100vh;
}
.el-header{
  padding: 0;
}
.el-main{
  padding-top: 0;
  padding-bottom: 0;
}

</style>
